<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<!-- .breadcrumb -->
	</div>
	<!-- Main content -->
	<div class="page-content">
    	<div class="row">
    	    <div class="page-header">
    			<h1>提现审核</h1>
    		</div>
    		<div class=" col-md-12 col-sm-12 col-xs-12 form">
                <div class="row">
                <!-- <form action="<?php echo base_url().'admin/gasstation/shop_settle'?>" method="get">
                    <div class="wh">
                    	<label>手机号码：</label>
                        <input type="text"  name="user_phone" value="<?php if (isset($user_phone))echo $user_phone;?>"/>
                    </div>
                    <div class="wh">
                        <button class="btn btn-sm btn-info" type="submit"><i class="icon-search"></i>查询</button>
                    </div> 
                </form> -->
                </div>
            </div>
            <input type="hidden" name="upid" id="upid" value=""/>
            <div class="col-xs-12 margin_t margin_b">
				<div class="table-responsive  tab">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="center" style="width: 3%;">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>订单金额</th>
								<th>提现金额</th>
                                <th>服务费</th>
                                <th>打款状态</th>
                                <th>店铺名称</th>
                                <th>手机号</th>
                                <th>创建时间</th>
                                <th style="width: 8%;">操作</th>
							</tr>
						</thead> 
						<tbody>
						<?php if (isset($result)&&count($result)>0){
                            	foreach ($result as $app){
                            	?>
							<tr>
								<td class="center">
                                	<p>
									<label>
										<input type="checkbox" class="ace" name="num[]" value="<?php echo $app->id;?>"/>
										<span class="lbl"></span>
									</label>
                                    </p>
								</td>
                                <td><p><?php echo $app->order_price;?></p></td>
                                <td><p><?php echo $app->settle_price;?></p></td>
                                <td><p><?php echo $app->service_price;?></p></td>
                                <td><p><?php 
                                    if($app->status == 0){
                                        echo "待打款";
                                    }elseif($app->status == 1){
                                        echo "已打款";
                                    }
                                    ?></p>
                                </td>
                                <td><p><?php echo $app->shop_name;?></p></td>
                                <td><p><?php echo $app->shop_phone;?></p></td>
                                <td><p><?php echo date('Y-m-d H:i:s',$app->create_time);?></p></td>
                                <td><p>
								    <a class="btn btn-sm btn-info s_confirm" data-id='<?php echo $app->id;?>' ><i class="icon-edit"></i>确认打款</a>
                                    </p>
                                </td>
    						</tr>
    						<?php }
                            }else{?>
                            <tr>
                            	<td colspan="10">无数据</td>
                            </tr>
                            <?php }?>
                            </tbody>
                         </table>
                     </div><!-- /.table-responsive -->
				</div>
                <div class="col-sm-12">
                	<div class="modal-footer no-margin-top">
	                	<div class="pull-left record">
							共<?php echo $count;?>条记录
	                    </div>
                		<?php if (isset($page))echo $page;?>
                	</div>
                </div>
            </div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->

    <script type="text/javascript">
        $('.s_confirm').click(function(){
            var id = $(this).attr('data-id');
            if(confirm('确认已经打款了吗?')){
                $.post("<?php echo base_url().'admin/gasstation/check_shop_commission'?>",{id:id},function(res){
                    var data = JSON.parse(res);
                    if(data.status){
                        alert('审核成功!');
                        window.location.reload();
                    }else{
                        alert('审核失败1');
                        console.log(data);
                    }
                })
            }
        })
    </script>